<template>
  <el-form :model="form" :inline="true" ref="form" @submit.native.prevent>
    <el-form-item label="分类名称" prop="evalTypeName">
      <el-input
        @keyup.native.enter="handleSearch"
        clearable
        placeholder="请输入分类名称"
        v-model="form.evalTypeName"
      />
    </el-form-item>
    <el-form-item>
      <el-tooltip class="item" effect="dark" content="查询" placement="top">
        <el-button type="primary" icon="el-icon-search" @click="handleSearch" />
      </el-tooltip>
      <el-tooltip class="item" effect="dark" content="重置" placement="top">
        <el-button @click="handleReset" icon="el-icon-refresh-right" />
      </el-tooltip>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  data() {
    return {
      form: {
        evalTypeName: null
      }
    }
  },
  methods: {
    handleSearch() {
      console.log('1111==================')

      this.$emit('search', this.form)
    },
    handleReset() {
      this.$refs.form.resetFields()
      this.$emit('search', this.form)
    }
  }
}
</script>

<style scoped>
.el-form-item {
  margin-bottom: 0;
}
</style>
